home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / PROGNG_C / DBTOOLC.LZH / SOURCE.ARC / DCTMSG.C < prev    next >
C/C++ Source or Header  |  1986-10-17  |  1KB  |  56 lines

  1. #include <stdio.h>
  2. #ifndef AZTEC
  3. #include <dos.h>
  4. #endif
  5.  
  6. extern char *CFuncArgs;
  7. extern char *errmsg[];
  8. extern int  DB_ERROR, DB_ERRFLG, DB_BELLFLG;
  9. extern int DB_E_VAR, DB_E_bx;
  10. #ifdef MS
  11. #define SetERet(val)    poke(DB_E_VAR, DB_E_bx, &val, 8)
  12. #endif
  13. #ifdef LATTICE
  14. #define SetERet(val)    poke(DB_E_VAR, DB_E_bx, (char *)&val, 8)
  15. #endif
  16. #ifdef AZTEC
  17. extern  int Our_Ds;
  18. #define SetERet(val)    movblock(&val, Our_Ds, DB_E_bx, DB_E_VAR, 8)
  19. #endif
  20.  
  21. dctmsg(msgno)
  22. int msgno;
  23. {
  24. int i;
  25. int buffer[80*5*2];
  26. char    *hitmsg = "Press any key to continue";
  27. double  temp;
  28.  
  29.   if (DB_ERRFLG)
  30.   {
  31.       if (DB_BELLFLG)
  32.           sound(500,2);
  33.     putwindow(1,0,4,79,buffer,1,1);
  34.     curlocat(2,1);
  35.     printf("CFUNC CALL: %s",CFuncArgs);
  36.     curlocat(3,1);
  37.     printf("DCTMSG:     %s",errmsg[msgno]);
  38.  
  39.     i = 0;
  40.     while (hitmsg[i])
  41.     {
  42.         curlocat(4,i+45);
  43.         wrtchatr(1,hitmsg[i++],26,0);
  44.     }
  45.  
  46.     getkeycl(&i);
  47.     if (i != 0x1b)
  48.         rstwindo(1,0,4,79, buffer);
  49.   }
  50.  
  51.     DB_ERROR = msgno;
  52.     temp = (double) DB_ERROR;
  53.     SetERet(temp);
  54.     return(DB_ERROR);
  55. }
  56.